package org.apache.flink.runtime.providermanager;

import org.apache.flink.runtime.allocatedeploy.execution.ExecutionID;

/** Interface for the communication of the 资源消费项 with the 资源提供者. */
/**
 * @类名: ProviderManagerActions
 * @说明: 消费项与资源提供者通讯接口
 *
 * @author   leehom
 * @Date	 2024年2月20日 下午12:29:54
 * 修改记录：
 *
 * @see 	 
 */
public interface ProviderManagerActions {

    /**
     * Notifies the task manager about a fatal error occurred in the task.
     *
     * @param message Message to report
     * @param cause Cause of the fatal error
     */
    void notifyFatalError(String message, Throwable cause);

    /**
     * Tells the task manager to fail the given task.
     *
     * @param executionID BusinessExecution attempt ID of the task to fail
     * @param cause Cause of the failure
     */
    void failTask(ExecutionID executionID, Throwable cause);

    /**
     * Notifies the task manager about the task execution state update.
     *
     * @param taskExecutionState Task execution state update
     */
    void updateTaskExecutionState(ResourceAllocationState taskExecutionState);
}
